
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/OnceYieldStatistics/onceYieldStatistics" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="onceYieldStatistics" />
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel" />
            <label >图号：</label>&nbsp;
            <input type="text" name="tuhao" value="${tuhao}"/>
            <label >合格率小于：</label>&nbsp;
            <input type="text" name="yield" value="${yield}"/>
            <label >时间段：</label>&nbsp;
            <input type="text" name="startTime" value="${startTime}" data-pattern="yyyy/MM/dd"  data-toggle="datepicker" placeholder="FROM">
            <input type="text" name="endTime" value="${endTime}" data-pattern="yyyy/MM/dd" data-toggle="datepicker" placeholder="TO">&nbsp;&nbsp;
            <button type="submit" class="aaa" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm','${request.getContextPath()}/OutsourcedProcessing/exportExcel')" data-icon="file-excel-o" title="导出Excel">导出</button>&nbsp;
        </div>
    </form>
</div>

<div class="bjui-pageContent">
    <g:if test="${onceYieldStatistics.size() > 0}">
        <table  data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr id="t1">
                <g:each in="${tableHeadList}" status="j" var="headInstance">
                    <g:if test="${headInstance!='RN'}">
                        <th  width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:if test="${onceYieldStatistics.size()>0}">
                <g:each in="${onceYieldStatistics}" status="i" var="dataInstance">
                    <tr>
                        <g:each in="${tableHeadList}" status="j" var="headInstance">
                            <g:if test="${headInstance=='PASS_YIELD'}">
                                <td name="PASSYIELD${i}">${dataInstance["${headInstance}"]}</td>
                            </g:if>
                            <g:elseif test="${headInstance=='QF'}">
                                <td name="QF${i}">${dataInstance["${headInstance}"]}</td>
                            </g:elseif>
                            <g:elseif test="${headInstance!='RN'}">
                                <td>${dataInstance["${headInstance}"]}</td>
                            </g:elseif>

                        </g:each>
                    </tr>
                </g:each>
            </g:if>
            <g:else>
                <g:render template="../template/emptyPanel" />
            </g:else>
            </tbody>
        </table>
    </g:if>
</div>
<g:render template="../template/pagination" />
<script>
    $(function(){
        for(var i=0;i<${onceYieldStatistics.size()};i++){
            var PASSYIELD="PASSYIELD"+i;
            var PASSYIELDNUM=parseFloat($("td[name='"+PASSYIELD+"']").text())
            if(PASSYIELDNUM<50){

                $("td[name='"+PASSYIELD+"']").css("background-color","#FF0000")
            }
            var QF="QF"+i;
            var QFNUM=$("td[name='"+QF+"']").text()
            if(QFNUM=="委外"){
                $("td[name='"+QF+"']").css("background-color","#0099FF")
            }
        }
    })
</script>